package com.xiashitech.interfaces.agent.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SystemInfoDTO {

    private static SystemInfoDTO systemInfoDTO;

    public static void setConfig(SystemInfoDTO systemInfoDTO) {
        SystemInfoDTO.systemInfoDTO = systemInfoDTO;
    }
    public static SystemInfoDTO getConfig() {
        return SystemInfoDTO.systemInfoDTO;
    }

    private Boolean systemExist;
    private String id;
    private String name;
    private String name_en;
    private String description;
    private String description_en;
    private String clients;

    private String microServiceId;
    private String host;
    //当前系统的agent的状态，状态码如下：null 未部署；0 已部署未运行；1 运行中；2 旁路运行；
    private Integer agentStatus;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date agentStatusCreate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date agentStatusUpdate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date agentStatusHeartBeat;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date searchStartDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date searchEndDate;
}
